// ================= Start of log.h =======================
#ifndef __AUTOLOCK_LOG_H__
#define __AUTOLOCK_LOG_H__

#include <e32base.h>
#include <e32std.h>

// Global function to log information
TBool PrintString16(const TDesC& aInfo);
TBool PrintString8(const TDesC8& aInfo);
TBool PrintNumber(TInt aInt);

// this macro is the key to swith console, logfile, or null
#define _DEBUB_NULL
//#define _DEBUG_CONSOLE_
//#define _DEBUG_LOGFILE_


#ifdef _DEBUG_CONSOLE_
#include <e32cons.h>     // For Console
#endif


#ifdef _DEBUG_LOGFILE_
#include <f32file.h>  // for logfile
#endif


#ifdef _DEBUG_CONSOLE_ // _DEBUG_CONSOLE_

	extern void ConsoleMainL();
	#define RUNMAIN()	TRAPD(error, ConsoleMainL());

#elif defined _DEBUG_LOGFILE_ // _DEBUG_LOGFILE_

	extern void LogfileMainL();
	#define RUNMAIN()	TRAPD(error, LogfileMainL());

#else	// _DEBUB_NULL
	extern void NullMainL();
	#define RUNMAIN()	TRAPD(error, NullMainL());

#endif	

#endif	//__AUTOLOCK_LOG_H__

// ================= End of log.h =========================